Private Sub IDTExtensibility_OnConnection(ByVal VBInst As Object, ByVal ConnectMode As vbext_ConnectMode, ByVal AddInInst As vbide.AddIn, custom() As Variant)
On Error GoTo error_handler
'save the vb instance
Set VBInstance = VBInst
'this is a good place to set a breakpoint and
'test various addin objects, properties and methods
Debug.Print VBInst.FullName
If ConnectMode = vbext_cm_External Then
'Used by the wizard toolbar to start this wizard
Me.Show
Else
Set mcbMenuCommandBar = AddToAddInCommandBar("&Procedure Builder")
'sink the event
Set Me.MenuHandler = VBInst.Events.CommandBarEvents(mcbMenuCommandBar)
End If
If ConnectMode = vbext_cm_AfterStartup Then
If GetSetting(App.Title, "Settings", "DisplayOnConnect", "0") = "1" Then